package com.heima.Config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;

//声明这是一个配置类


@Configuration
//扫描注解
//@ComponentScan("com.heima")
//@ComponentScan({"com.heima.Dao","com.heima.Service"})
//@ComponentScan(value = {"com.heima.Dao","com.heima.Service"})

//扫描中，排除指定的类
//excludeFilters:排除
    //type:排除类型：5种 FilterType.ANNOTATION ：按照注解类型排除
    //value:排除的项
@ComponentScan(value = "com.heima",
    excludeFilters = @ComponentScan.Filter(
            type = FilterType.ANNOTATION,
            value = {Controller.class/*, Repository.class*/}
    ))

//@PropertySource文件扫描 不支持通配
@PropertySource("classpath:jdbc.properties")

//导入其他配置文件
@Import({JdbcConfig.class, MybatisConfig.class})
public class SpringConfig {
}
